<%@ page contentType="text/html;charset=UTF-8" %>

<html>
<head>
  <meta charset="UTF-8">
  <title>文件上传系统</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Microsoft YaHei', Arial, sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      padding: 20px;
    }

    .container {
      max-width: 800px;
      margin: 0 auto;
      background: white;
      border-radius: 15px;
      box-shadow: 0 10px 30px rgba(0,0,0,0.2);
      overflow: hidden;
    }

    .header {
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      color: white;
      padding: 30px;
      text-align: center;
    }

    .header h1 {
      font-size: 2.5em;
      margin-bottom: 10px;
    }

    .header p {
      font-size: 1.1em;
      opacity: 0.9;
    }

    .content {
      padding: 40px;
    }

    .upload-form {
      border: 3px dashed #4facfe;
      border-radius: 10px;
      padding: 30px;
      text-align: center;
      margin-bottom: 30px;
      transition: all 0.3s ease;
    }

    .upload-form:hover {
      border-color: #667eea;
      background: #f8f9ff;
    }

    .file-input {
      margin: 20px 0;
    }

    .file-input input[type="file"] {
      width: 100%;
      padding: 15px;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      background: #f8f9fa;
    }

    .submit-btn {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      padding: 15px 40px;
      border-radius: 25px;
      font-size: 1.1em;
      cursor: pointer;
      transition: transform 0.2s ease;
    }

    .submit-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

    .info-panel {
      background: #f8f9fa;
      padding: 25px;
      border-radius: 10px;
      margin-top: 20px;
    }

    .info-panel h3 {
      color: #667eea;
      margin-bottom: 15px;
    }

    .info-panel ul {
      list-style: none;
      padding-left: 20px;
    }

    .info-panel li {
      margin: 8px 0;
      padding-left: 15px;
      position: relative;
    }

    .info-panel li:before {
      content: "✓";
      color: #4facfe;
      position: absolute;
      left: 0;
    }

    .nav-links {
      text-align: center;
      margin-top: 20px;
    }

    .nav-link {
      display: inline-block;
      margin: 0 10px;
      padding: 10px 20px;
      background: #6c757d;
      color: white;
      text-decoration: none;
      border-radius: 20px;
      transition: background 0.3s ease;
    }

    .nav-link:hover {
      background: #5a6268;
    }
  </style>
</head>
<body>
<div class="container">
  <div class="header">
    <h1>📁 文件上传系统</h1>
    <p>安全、高效、便捷的文件管理解决方案</p>
  </div>

  <div class="content">
    <form class="upload-form" action="upload" method="post" enctype="multipart/form-data">
      <h2>选择要上传的文件</h2>
      <p>支持多文件同时上传，自动重命名保障安全</p>

      <div class="file-input">
        <input type="file" name="file1" multiple accept=".jpg,.jpeg,.png,.gif,.pdf,.txt,.doc,.docx,.xls,.xlsx">
      </div>

      <div class="file-input">
        <input type="file" name="file2" multiple accept=".jpg,.jpeg,.png,.gif,.pdf,.txt,.doc,.docx,.xls,.xlsx">
      </div>

      <div class="file-input">
        <input type="file" name="file3" multiple accept=".jpg,.jpeg,.png,.gif,.pdf,.txt,.doc,.docx,.xls,.xlsx">
      </div>

      <button type="submit" class="submit-btn">🚀 开始上传</button>
    </form>

    <div class="info-panel">
      <h3>📋 上传说明</h3>
      <ul>
        <li><strong>支持格式：</strong>图片(JPEG, PNG, GIF)、PDF、文本文件、Word文档、Excel表格</li>
        <li><strong>大小限制：</strong>单个文件不超过10MB，总上传不超过50MB</li>
        <li><strong>安全特性：</strong>文件自动重命名为UUID，防止文件名冲突和攻击</li>
        <li><strong>文件管理：</strong>支持在线查看、下载和删除已上传文件</li>
      </ul>
    </div>

    <div class="nav-links">
      <a href="upload?action=list" class="nav-link">📂 查看文件列表</a>
      <a href="upload" class="nav-link">🔄 刷新页面</a>
    </div>
  </div>
</div>
</body>
</html>